<@_model id=id>
	<#assign a=object/>
	<#if (object.parentId)??><#assign parentId=object.parentId/></#if>
</@_model>
<div class="pageContent">
	<form method="post" action="cmsModel/save.do?callbackType=closeCurrent&navTabId=cmsModel/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<input name="id" type="hidden" value="${id!}" />
		<input name="parentId" type="hidden" value="${parentId!}" />
		<div class="pageFormContent" layoutH="57">
			<fieldset>
				<legend>模型属性</legend>
				<dl class="nowrap">
					<dt>模型名称:</dt>
					<dd>
						<input class="required" name="name" type="text" maxlength="20" size="20" value="${(a.name)!}"/>
						<label>
							<input name="onlyUrl" type="checkbox" onclick="if($(this).is(':checked')){$('.onlyUrl').hide();$('.onlyUrl input[type=text]',navTab.getCurrentPanel()).val('');}else{$('.onlyUrl').show();}"/>
							链接
						</label>
						<label class="onlyUrl"><input name="hasChild" type="checkbox"/>拥有子模型</label>
						<label class="onlyUrl"><input name="hasImages" type="checkbox"/>拥有图片列表</label>
						<label class="onlyUrl"><input name="hasFiles" type="checkbox"/>拥有附件列表</label>
					</dd>
				</dl>
			<#if site.useStatic>
				<dl class="onlyUrl nowrap">
					<dt>默认模板路径:</dt>
					<dd>
						<input name="templatePath" type="text" maxlength="200" size="30" value="${(a.templatePath)!}"/>
						<a class="btnLook" href="cmsTemplate/lookup.html?field=templatePath" lookupGroup="">选择默认静态化模板路径</a>
						<span class="info">
							静态化过程以分类与模型映射模板路径为准，此处选择仅为简化后面操作，
						</span>
					</dd>
				</dl>
			</#if>
			<#if a?has_content>
				<script>
				<#if a.hasChild>
					$('input[name=hasChild]',navTab.getCurrentPanel()).click();
				</#if>
				<#if a.onlyUrl>
					$('input[name=onlyUrl]',navTab.getCurrentPanel()).click();
				</#if>
				<#if a.hasImages>
					$('input[name=hasImages]',navTab.getCurrentPanel()).click();
				</#if>
				<#if a.hasFiles>
					$('input[name=hasFiles]',navTab.getCurrentPanel()).click();
				</#if>
				</script>
			</#if>
			</fieldset>
<#if a?has_content>
	<@_sysExtendFieldList extendId=a.extendId>
		<#assign contentExtendList=page.list>
	</@_sysExtendFieldList>
</#if>
			<fieldset>
				<legend>内容扩展字段</legend>
				<#include "../include_page/extends.html"/>
				<@extends 'contentExtends' contentExtendList![]/>
			</fieldset>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
</div>